/**
 * 启用或禁用某个表单控件
 * @param {*} flag flag true则禁用，false则解除禁用，undefind自动切换
 * @returns {object} 返回jQuery对象
 */
$.fn.toggleDisabled = function (flag) {
  this.toggleClass('disabled', flag);
  if (typeof flag == 'boolean') {
    this[0].disabled = flag;
  } else {
    this[0].disabled = !this[0].disabled;
  }
  return this;
};
